#include "thread.hpp"
#include<unistd.h>
#include<vector>
using namespace ThreadModlue;

void* routine(pthread_t tid)
{
    int cnt = 10;
    //char _name[64] = {0};
    //pthread_getname_np(tid,_name,sizeof(_name));
    while(cnt--)
    {
        std::cout << "hello" << std::endl;
        sleep(1);
    }
    return nullptr;
}

int main()
{
    Thread t(routine,10);
    t.Start();
    sleep(5);
    //t.Stop();
    //t.Detach();
    t.Join();
    sleep(10);
    return 0;
}
